package com.example.chatrecommendation.bean.vo;

import com.example.chatrecommendation.bean.ChattingRecords;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import javax.validation.constraints.NotNull;
import javax.validation.constraints.Size;
import java.time.LocalDateTime;
import java.util.Date;

/**
 * @author Jasmine-drs
 * @date 2024/5/21 20:40
 */

@Data
public class ChattingListVo {
	@NotNull(message="[]不能为空")
	@ApiModelProperty("索引")
	private Integer id;

	@Size(max= 255,message="编码长度不能超过255")
	@ApiModelProperty("历史记录名称")
	private String name;

	@NotNull(message="[]不能为空")
	@ApiModelProperty("")
	private LocalDateTime createTime;

	public static ChattingListVo toChattingListVo(ChattingRecords chattingRecords1) {
		ChattingListVo chattingListVo = new ChattingListVo();
		chattingListVo.setId(chattingRecords1.getId());
		chattingListVo.setName(chattingRecords1.getName());
		chattingListVo.setCreateTime(chattingRecords1.getCreateTime());
		return chattingListVo;
	}
}
